﻿<UserControl x:Class="WpfDataUi.Controls.AngleSelectorDisplay"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             >
    <Grid DragOver="Grid_DragOver_1">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <Label x:Name="Label" Grid.Column="0" VerticalAlignment="Center">TitleText</Label>
        <Canvas Grid.Column="1" Width="40" Height="40" Margin="6">
            <Ellipse Grid.Column="0" Width="40" Height="40" Stroke="Gray" MouseMove="Ellipse_MouseMove_1" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown_1">
                <Ellipse.Fill>
                    <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
                        <GradientStop Color="White" Offset="0.0" />
                        <GradientStop Color="LightGray" Offset="1.0" />
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
            <Line x:Name="Line" Canvas.Left="20" Canvas.Top="20" X1="0" Y1="0" X2="22" Y2="0" 
                  StrokeThickness="3" StrokeEndLineCap="Triangle" RenderTransformOrigin="0,0" MouseMove="Ellipse_MouseMove_1">
                <Line.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="{Binding Path=NegativeAngle}"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Line.RenderTransform>
                <Line.Stroke>
                    <SolidColorBrush Color="Black"></SolidColorBrush>
                    
                    
                </Line.Stroke>
                
            </Line>
            <Ellipse Name="CenterPoint" Grid.Column="0" Width="4" Height="4" Fill="Gray" Canvas.Left="18" Canvas.Top="18" />

        </Canvas>
        <Grid Grid.Column="2">
            <TextBox x:Name="TextBox" MinWidth="50" Height="24" PreviewKeyDown="TextBox_PreviewKeyDown_1" 
                     LostFocus="TextBox_LostFocus_1"
                     Margin="0,0,13,0"
                     />
            <Label Content="&#186;" Height="32" Width="15" HorizontalAlignment="Right"></Label>
        </Grid>
    </Grid>
</UserControl>
